<template>
	<view class="help">
		<view class="cell_4 bg-white margin-top-sm" style="padding:20rpx 30rpx; border-radius: 15rpx;">
			<view class="flex justify-between align-center" v-for="(item,index) in list" :key="index" @click="toDetail(item)">
				<view class="flex justify-center align-center padding-left-xs">
					<text>{{item.name}}</text>
				</view>
				<text class="lg text-gray cuIcon-right"></text>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				page:1,
				total:0,
			}
		},
		methods: {
			goBack(){
				uni.navigateBack()
			},
			toDetail(e){
				uni.navigateTo({
					url:'/otherpages/setting/help/detail?data=' + JSON.stringify(e)
				})
			},
			getList(){
				this.request.httpTokenRequest({
					url: "index/help",
					method: "get"
				}, {
					page:this.page
				}).then(data => {
					if (data.code == 0) {
						this.total = data.data.total
						data.data.data.forEach(item=>{
							this.list.push(item)
						})
					}else {
						this.$util.msg(data.msg)
					}
				}, error => {})
			}
		},
		onLoad() {
			this.getList()
		}
	}
</script>

<style lang="scss" scoped>
	.cell_4 {

		&>view,
		navigator {
			padding: 20rpx 0;
		}
	}
</style>